<?php
class UsuariosView extends CustomView
{

    public function nuevo($vars = array())
    {
        $this->top();
        $this->setTemplate('nuevo');
        $this->parse('nuevo', $vars);
        $this->bottom();
    }

    public function editar($vars = array())
    {
        $this->top();
        $this->setTemplate('editar');
        $this->parse('editar', $vars);
        $this->bottom();
    }

    public function verUsuarios($vars = array())
    {
        $this->top();
        $this->setTemplate('ver');
        $vars['pagination'] = $this->buildPagination($vars['pagination_link'], $vars['usuarios']);
        $this->parse('ver', $vars);
        {
            if (!empty($vars['usuarios']['results']))
            {
                foreach ($vars['usuarios']['results'] as $usuario)
                {
                    $this->parse('usuario', $usuario);
                }
            }
			else
			{
				$this->parse('sin_resultados');
			}
        }
        $this->parse('ver', $vars);
        $this->bottom();
    }

}
?>